<include file="public:header" />
<link rel="stylesheet" type="text/css" href="__STATIC__/js/jquery-ui/themes/blue/jquery.ui.all.css" />
<link rel="stylesheet" type="text/css" href="__STATIC__/js/jquery-ui/extend/datepicker/jquery-ui-timepicker-addon.css" />

<div id="bd">
    <div class="layout grid-s45m0 w1000 user-center">
        <div class="col-main">
            <div class="main-wrap">
                <div class="box J_TBox">
                    <div class="global-title">历史资金报表</div>
                </div>
                <div class="box J_TBox">
                    <div class="global-title" style="border:none;">
                        <div class="order_search_box">
                            <form method="get" action="">
                                <input type="submit" class="order_sub" value="搜索">
                                <input type="button" onclick="resets()" class="order_sub" value="重置">
                                <input type="submit" class="order_sub" value="导出" name="export" id="export-btn"/>

                                <input type="text" id="username" style="width:80px" name="tele" class="order_text fl" placeholder="用户账号" value="{$Think.get.tele}">
                                <input type="text" id="realname" style="width:80px" name="username" class="order_text fl" placeholder="用户昵称" value="{$Think.get.username}">
                                <span class="fl" style="font-size:12px;">开始日期：</span>
                                <input type="text" id="stime" name="stime" class="J_date_picker order_text fl short" value="{$Think.get.stime}" style="width:100px">
                                <span class="fl" style="font-size:12px;">~结束日期：</span>
                                <input type="text" id="etime"  name="etime" class="J_date_picker order_text fl short" value="{$Think.get.etime}" style="width:100px">

                                <span class="standard_select fl">
                                    <!--{:var_dump($arrGroupName);}-->
									<span class="select_shelter">
									<select id="topkey" name="tgroup" class="order_select fl" style="width:112px;">
										<option value="all">全部</option>
                                        <foreach name="tmp_add_arr" item="vo" key="k">
                                            <option value="{$k}">{$vo}</option>
                                        </foreach>
									</select>
									</span>
								</span>

                                <span class="standard_select fl">
									<span class="select_shelter">
									<select id="" name="uid" onchange="getNestUids(this)" class="order_select fl" style="width:112px;">
										<option value="{$uid}">--{$new_username}--</option>
                                        <foreach name="listTeams" item="vo" key="ko">
                                            <option value="{$vo.id}">{$vo.username}</option>
                                        </foreach>
									</select>
									</span>
								</span>
                                <input type="hidden" name="g" value="team">
                                <input type="hidden" name="m" value="user">
                                <input type="hidden" name="a" value="history_list">
                            </form>
                        </div>
                    </div>
                </div>
                <div class="box J_TBox">
                    <div class="diary-content">
                        <table class="table_list" width="100%" cellspacing="0" cellpadding="0">
                            <tr class="title">
                                <th width="100">时间日期</th>
                                <th width="100">用户账号</th>
                                <th width="80">用户昵称</th>
                                <th width="80">用户类型</th>
                                <th width="120">充值</th>
                                <th width="80">提现</th>
                                <th width="65">订单消费</th>
                                <th width="80">升级成功退款</th>
                                <th width="80">提货运费</th>
                                <th width="85">返佣</th>
                                <th width="95">当前余额</th>
                                <th width="80">代理商名称</th>
                                <th width="80">经销商名称</th>
                                <th width="80">总经销商名称</th>
                                <th width="80">团队名称</th>
                            </tr>
                            <tr class="content_tr underline">
                                <td colspan="15">
                                    <div class="weixiao">
                                        {$tuanNmae}是--{$new_username}--的资金明细是
                                    </div>
                                </td>
                            </tr>
                            <if condition="$lists">
                                <volist name="lists" id="val">
                                    <tr class="content_tr underline">
                                        <td align="left">
                                            {$val.ktime}
                                        </td>
                                        <td align="center">
                                            {$val.tele}
                                        </td>
                                        <td align="center">
                                            {$val.username}
                                        </td>
                                        <td align="center">
                                            {$val['tgroup']}
                                        </td>
                                        <td align="center">
                                            {$val.recharge}
                                        </td>
                                        <td align="center">
                                            {$val.cash}
                                        </td>
                                        <td align="center">
                                            {$val.order1}
                                        </td>
                                        <td align="center">
                                            {$val.order_refund}
                                        </td>
                                        <td align="center">
                                            {$val.express}
                                        </td>
                                        <td align="center">
                                            {$val.commission}
                                        </td>
                                        <td align="center">
                                            {$val.now_price}
                                        </td>
                                        <td align="center">
                                            {$val.tgroup_3}
                                        </td>
                                        <td align="center">
                                            {$val.tgroup_2}
                                        </td>
                                        <td align="center">
                                            {$val.tgroup_1}
                                        </td>
                                        <td align="center">
                                            {$val.topkey}
                                        </td>
                                    </tr>
                                </volist>
                                <else />
                                <tr class="content_tr underline">
                                    <td colspan="15"><div class="weixiao">暂无内容 </div></td>
                                </tr>
                            </if>
                        </table>
                    </div>
                </div>
                <div class="box J_TBox">
                    <div class="global-pages">
						<span class="num">
							{$page}
						</span>
                    </div>
                </div>
            </div>
        </div>
        <include file="user:left" />
    </div>
</div>
<script>
    //    清空
    function resets(f1)
    {
        $('#username').val('');
        $('#realname').val('');
        $('#stime').val('');
        $('#etime').val('');
        $('#topkey').find('option:first-child').attr('selected',"selected");
        $('#lottery').find('option:first-child').attr('selected',"selected");
    }

    //    级联
    function getNestUids(obj){
        var ob = $(obj);
        var uid = ob.val();
        var par = ob.parents('.standard_select');
        par.nextAll('.standard_select').remove();
        $.ajax({
            type:'get',
            url:"{:U('user/getNestUids')}",
            data:{uid:uid},
            success:function(data)
            {
                par.after(data);
            },
            error:function()
            {
//                console.log(data);
                alert('异常');
            },
            dataType:'json',
        });
    }
</script>
<!--主部结束-->
<include file="public:footer" />